package com.smarttourism.mapper;

import com.smarttourism.domain.Customer;
import com.smarttourism.domain.CustomerIdType;
import com.smarttourism.domain.CustomerRange;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author SHX
* @description 针对表【customer(旅客表)】的数据库操作Mapper
* @createDate 2024-10-22 11:11:50
* @Entity com.smarttourism.domain.Customer
*/
@Mapper
public interface CustomerMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    // 条件查询
    List<Customer> findCustomers(String name);

    CustomerRange findCustomerRangeByRangeId(int id);

    CustomerIdType findCustomerIdTypeByTypeId(int id);

    Integer selectIdByCustomerIdCard(String idCard);

    int updateCrangeTo2ByIdCard(String idCard);

    // 动态删除
    int updateDelByids(Integer[] ids);

    // 删除
    int updateDelByid(int id);

}
